package com.haizhi.crm.biz.model;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.haizhi.crm.sys.auth.model.UserResultVo;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;
import java.util.List;

/**
 * Desc:拜访记录result
 * Created by ch on 2018/02/24
 */
@Data
@NoArgsConstructor
public class VisitRecordResultVo {

    private Long id;
    private String objectKey;
    private int browseCount;

    private Long userId;

    private String productKey;

    private String innerEventKey;

    private String outerEventKey;

    private String customerKey;

    private String title;

    private String address;

    private String recordDesc;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8" )
    private Date visitTimeStart;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8" )
    private Date visitTimeEnd;

    private Date updateTime;

    private Long createdBy;

    Long visitRecordId;

    String receiver;

    //创建人姓名
    private String createrName;

    //拜访人ids
    private String visitorIds;

    //拜访人
    private List<UserResultVo> visitors;

    //客户信息
    private CompanyVo customer;

    private boolean isFavourited;

    public VisitRecordResultVo(
            Long id, Long userId, String objectKey, String productKey, String innerEventKey, String outerEventKey, String customerKey,
            String title, String address, String recordDesc, Date visitTimeStart, Date visitTimeEnd,
            Date updateTime, Long createdBy, String createrName, String visitorIds, Long visitRecordId, String receiver) {
        this.id = id;
        this.userId = userId;
        this.objectKey = objectKey;
        this.productKey = productKey;
        this.innerEventKey = innerEventKey;
        this.outerEventKey = outerEventKey;
        this.customerKey = customerKey;
        this.title = title;
        this.address = address;
        this.recordDesc = recordDesc;
        this.visitTimeStart = visitTimeStart;
        this.visitTimeEnd = visitTimeEnd;
        this.updateTime = updateTime;
        this.createdBy = createdBy;
        this.createrName = createrName;
        this.visitorIds = visitorIds;
        this.visitRecordId = visitRecordId;
        this.receiver = receiver;
    }
}
